package io.modifier.basic.compose.hooks

import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import io.modifier.basic.compose.hooks.comm.Single
import io.modifier.basic.compose.hooks.data.useState

@Suppress("UNUSED_VARIABLE")
@Composable
inline fun useUpdate(): () -> Unit {
    var state by useState(0.0)
    val (single) = Single(state) // core logic
    return {
        state += 1
    }
}
